<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	<h:form id="formAlterarSenha">
		<p:dialog id="modalAlterarSenha" header="#{str.modal_alterar_senha_titulo_modal}" widgetVar="alterarSenhaVar" modal="true" resizable="false" draggable="false" closable="true" rendered="#{login.loginEfetuado()}">
			<p:messages id="messagesAlterarSenha" showDetail="true" autoUpdate="false" closable="true"/>
			<p:panel id="panelAlterarSenha">
				<h:panelGrid columns="2" cellpadding="5">
					<p:column>
						<p:outputLabel value="#{str.modal_alterar_senha_atual_senha}:" for="inputSenhaAtual" />
						<span class="obrigatoriedade-campos">#{str.um_asterisco}</span>
					</p:column>
					<p:column>
						<p:password id="inputSenhaAtual" tabindex="1" maxlength="#{propriedades.getTamanhoMinSenhaUsuarioDoSistema()}" placeholder="#{str.modal_alterar_senha_qual_senha_atual}" autocomplete="false" value="#{alterarSenha.senhaAtual}" styleClass="campo-texto-alterar-senha" />
					</p:column>
					<p:column>
						<p:outputLabel value="#{str.modal_alterar_senha_nova_senha}:" for="inputNovaSenha" />
						<span class="obrigatoriedade-campos">#{str.um_asterisco}</span>
					</p:column>
					<p:column>
						<p:password id="inputNovaSenha" tabindex="2" maxlength="#{propriedades.getTamanhoMinSenhaUsuarioDoSistema()}" placeholder="#{str.modal_alterar_senha_qual_nova_senhal}" autocomplete="false" value="#{alterarSenha.novaSenha}" styleClass="campo-texto-alterar-senha" />
					</p:column>
					<p:column>
						<p:outputLabel value="#{str.modal_alterar_senha_confirme_senha}:" for="inputConfirmeSenha" />
						<span class="obrigatoriedade-campos">#{str.um_asterisco}</span>
					</p:column>
					<p:column>
						<p:password id="inputConfirmeSenha" tabindex="3" maxlength="#{propriedades.getTamanhoMinSenhaUsuarioDoSistema()}" placeholder="#{str.modal_alterar_senha_confirme_nova_senha}" autocomplete="false" value="#{alterarSenha.confirmeSenha}" styleClass="campo-texto-alterar-senha" />
					</p:column>
				</h:panelGrid>
				<f:facet name="footer">
					<p:commandButton value="#{str.modal_alterar_senha_botao_alterar}" update=":#{p:component('messagesAlterarSenha')}, :#{p:component('panelAlterarSenha')}" action="#{alterarSenha.alterarSenha()}"/>
				</f:facet>
			</p:panel>   
		</p:dialog>
	</h:form>
</ui:fragment>